package com.jmb.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * 
 * @TableName t_interface_processor
 */
@TableName(value ="t_interface_processor")
@Data
public class InterfaceProcessor extends BaseEntity{


    /**
     * 接口测试用例编号
     */
    @Schema(description = "接口测试用例编号")
    @NotNull(message = "测试用例编号不能为空")
    @TableField(value = "case_id")
    private Long caseId;

    /**
     * 后置处理器取值名称
     */
    @Schema(description = "后置处理器取值名称")
    @NotNull(message = "后置处理器名称不能为空")
    @NotEmpty(message = "后置处理器名称不能为空")
    @Size(max = 50, message = "后置处理器名称必须小于等于50")
    @TableField(value = "name")
    private String name;

    /**
     * 提取数据类型   提取数据类型   0response-json/1response-html/2response-header/3request-header/4request-params/5request-data/6request-json
     */

    @Schema(description = "提取数据类型   0response-json/1response-html/2response-header/3request-header/4request-params/5request-data/6request-json")
    @NotNull(message = "后置处理器提取类型不能为空")
    @Max(value = 6, message = "后置处理器提取类型方式为0~6")
    @Min(value = 0, message = "后置处理器提取类型方式为0~6")
    @TableField(value = "type")
    private Integer type;

    /**
     * 提取表达式
     */
    @Schema(description = "提取表达式")
    @NotNull(message = "后置处理器提取表达式不能为空")
    @NotEmpty(message = "后置处理器提取表达式不能为空")
    @Size(max = 50, message = "后置处理器提取表达式必须小于等于50")
    @TableField(value = "expression")
    private String expression;

    /**
     * 缺省值
     */
    @Schema(description = "缺省值")
    @Size(max = 100, message = "缺省值必须小于等于100")
    @NotNull(message = "是否存在缺省值不能为空")
    @Max(value = 1, message = "是否存在缺省值为0~1")
    @Min(value = 0, message = "是否存在缺省值0~1")
    @TableField(value = "default_value")
    private String defaultValue;

    /**
     * 是否存在缺省值0是1否
     */
    @Schema(description = "是否存在缺省值0是1否")
    @TableField(value = "have_default_value")
    private Integer haveDefaultValue;

}